
<!doctype html>  
<html>  
<head>  
    <meta charset="utf-8">  
    <meta http-equiv="X-UA-Compatible" content="IE=edge">  
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">  
    <title>折线、多边形、圆</title>  
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/> 
    <script type="text/javascript" src='../bus/hplus/js/jquery.min.js'></script> 
    <script src="http://webapi.amap.com/maps?v=1.3&key=a7e02b77430c5867cf93b263234dbeba"></script>  
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>  
</head>  
<body>  
<div id="container"></div>  
<script>  
    var map = new AMap.Map('container', {  
        resizeEnable: true,  
        center: [116.397428, 39.90923],  
        zoom: 13  
    });  
    var lineArr = [  
        [116.368904, 39.913423],  
        [116.382122, 39.901176],  
        [116.482123, 39.801178],  
        [116.387271, 39.912501],  
        [116.398258, 39.904600]  
    ];  
    var polyline = new AMap.Polyline({  
        path: lineArr,          //设置线覆盖物路径  
        strokeColor: "#000000", //线颜色  
        strokeOpacity: 2,       //线透明度  
        strokeWeight: 2,        //线宽  
        strokeStyle: "solid",   //线样式  
        strokeDasharray: [10, 5] //补充线样式  
    });  
    polyline.setMap(map);  
  
   
  
   
</script>  
</body>  
</html>  